unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
  but = array[0..19] of TButton;
var
  Form1: TForm1;
  b : array[0..19] of but;
implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
var
i, j : integer;
begin
  for i:=0 to 19 do
    for j:=0 to 19 do
    begin
      b[i][j] := TButton.Create(Form1);
      b[i][j].Height := 15;
      b[i][j].Width := 20;
      b[i][j].Left := (b[i][j].Width)*(i mod 20);
      b[i][j].Top := (b[i][j].Height)*(j mod 20);
      b[i][j].parent := Form1;
    end;
  Timer1.Enabled := False;
end;

end.
